package OOPS;

class Hello3 {
	int abc;
	float f1;
}

class HelloService {
	public void modifyValue(int ab) {
		System.out.println("-- modifyValue(int)");
		System.out.println("Before\t:" + ab);
		ab = ab + 100;
		System.out.println("After\t:" + ab);
	}

	public void modifyValue(Hello3 h) {
		System.out.println("-- modifyValue(Hello)");
		System.out.println("Before\t:" + h.abc + "\t" + h.f1);
		h.abc = h.abc + 140;
		h.f1 = h.f1 + 45;
		System.out.println("After\t:" + h.abc + "\t" + h.f1);
	}
}

class Test41 {
	public static void main(String str[]) {
		HelloService hs = new HelloService();
		int ab = 12;
		System.out.println("************* primitive ****************");
		System.out.println("In main Before method\t:" + ab);
		hs.modifyValue(ab);
		System.out.println("In main After method\t:" + ab);
		System.out.println("************* refrence ****************");
		Hello3 h = new Hello3();
		h.abc = 12;
		h.f1 = 89.91F;
		System.out.println("In main Before method\t:" + h.abc + "\t" + h.f1);
		hs.modifyValue(h);
		System.out.println("In main After method\t:" + h.abc + "\t" + h.f1);
	}
}